<!-- Alert sapaan pertama muncul -->
<div class="alert alert-info alert-dismissible" role="alert">
  <button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  <strong>Hi <?php echo $cookie['c_fullname']?>.. </strong> Pada halaman ini anda dapat menambahkan banner, yang akan di tampilkan di toko online anda
</div>
<!-- end Alert sapaan pertama muncul -->

<!-- Form upload banner -->
<div class="panel panel-primary">
  	<div class="row">
  		<div class="col-lg-12">
			<form class="form-horizontal" role="form" enctype="multipart/form-data" action="<?php echo site_url('admin/tambah_banner') ?>" method="POST">
				<br>
  				<div class="form-group">
    				<label for="inputPassword3" class="col-sm-offset-3 col-sm-2 control-label">Gambar Banner</label>
    				<div class="col-sm-2">
      					<span class="btn btn-default btn-file">
        					<input type="file" name="gambar_banner" id="gambar_banner">
        				</span>
    				</div>
  				</div>
  				<div class="form-group">
    				<div class="col-sm-offset-5 col-sm-3">
      					<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Tambah</button>
						<button type="reset" class="btn"><i class="glyphicon glyphicon-repeat"></i> Reset</button>
    				</div>
    			</div>
			</form>
    	</div>
  	</div>
</div>
<!-- end form upload banner -->

<!-- Alert pemberitahuan -->
<?php if($this->session->flashdata('info')) { ?>
	<div class="alert alert-info alert-dismissible" role="alert">  
		<a class="close" data-dismiss="alert">x</a>  
		<strong>Info!!! </strong><?php echo $this->session->flashdata('info'); ?>  
	</div>
<?php }?>
<?php if($this->session->flashdata('error')) { ?>
	<div class="alert alert-warning alert-dismissible" role="alert">  
		<a class="close" data-dismiss="alert">x</a>  
		<strong>Warning !!! </strong><?php echo $this->session->flashdata('error'); ?>  
	</div>
<?php }?>
<!-- end Alert pemberitahuan -->

<!-- Tabel banner -->
<div class="table">
	<?php
		if(empty($hasil)){
			echo "Tidak ada data";
		}
		else{
	?>
	<table class="table">
		<tr class="table table-bordered active">
			<td><strong> No </strong></td>
			<td><strong>Gambar</strong></td>
			<td><strong>Status </strong> </td>
			<td align="center"><strong>Action </strong></td>
		</tr>
	<?php
        $no = 1;
        foreach($hasil as $data) {
    ?>
    <tr>
		<tr class="table">
			<td><?php echo $no++ ;?></td>
			<!-- Menampilakn gambar -->			
			<td>
				<img  width="100px" src="<?php echo base_url(); ?>upload/banner/<?php echo $data->nama_baner; ?>" alt="">
            </td>
            <!-- end tampil gambar -->
            <td><?php echo $data->status;?></td>
			<td border="0" align="center">
			<a title="Edit Produk Produk" href="#">
				<i class="glyphicon glyphicon-pencil"></i> Edit	</a> | <a href="#" onClick="if(confirm('Anda yakin HAPUS data ini? ')){document.location='#'}" title="Hapus Produk" >
				<i class="glyphicon glyphicon-trash"></i> Hapus </a>
			</td>
		</tr>
	<?php } ?>
	</table>
	<?php
	    }
	?>
</div>
<!-- end tabel banner -->